home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 68.7z / BS1 part 68 / Type Smith v2.0 (1993)(Relog)[h SR][WB].7z / Type Smith v2.0 (1993)(Relog)[h SR][WB].adf / REXX.lha / Rexx / MakeLibrary.tsrx < prev    next >
Text File  |  1993-11-08  |  1KB  |  71 lines

  1. /* MAKE LIBRARY: export a font as IFF DR2D drawings */
  2. /* Copyright 1993 Soft-Logik Publishing Corporation */
  3. /* May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4. /* $VER: 2.0 */
  5.  
  6. /* Note: characters must exist to be exported! */
  7.  
  8. ADDRESS 'TYPESMITH'
  9. OPTIONS RESULTS
  10. TRACE OFF
  11.  
  12. /* Screen to front */
  13.  
  14. to_front
  15.  
  16. /* get the file name prefix for the drawings */
  17.  
  18. get_string 'Enter the filepath and filename prefix:|Ok|Exit'
  19. IF RC=5 THEN EXIT
  20.  
  21. library=RESULT
  22.  
  23. /* FIND WHICH CHARACTERS TO EXPORT */
  24.  
  25. firstchar=1
  26. lastchar=255
  27.  
  28. display_alert 'Export all the characters in the font?|All|Some'
  29.  
  30. IF RC=5 THEN DO
  31.  
  32.     /* get the start and end characters to export */
  33.  
  34.     Get_First:
  35.     get_string 'Enter the number of the first character:|Ok|Exit'
  36.     IF RC=5 THEN EXIT
  37.     firstchar=RESULT
  38.     IF (firstchar<1)|(firstchar>255) THEN DO
  39.         display_alert 'Must be between 0 and 255.|Continue'
  40.         SIGNAL get_first
  41.     END
  42.  
  43.     Get_Last:
  44.     get_string 'Enter the number of the last character:|Ok|Exit'
  45.     IF RC=5 THEN EXIT
  46.     lastchar=RESULT
  47.     IF (lastchar<firstchar)|(lastchar>255) THEN DO
  48.         display_alert 'Must be between the first character and 255.|Continue'
  49.         SIGNAL get_last
  50.     END
  51. END
  52.  
  53. /* EXPORT LOOP */
  54.  
  55. exportcount=0
  56.  
  57. DO i=firstchar TO lastchar
  58.     goto_char i
  59.     filename=library'.'i
  60.     export_dr2d filename
  61.     exportcount=exportcount+1
  62.     IF (RC~=0) THEN DO
  63.         display_alert 'File error!|_Exit'
  64.         EXIT
  65.     END
  66. END
  67.  
  68. display_alert ' 'exportcount' character(s) exported!|Exit'
  69.  
  70. /* THAT'S ALL SHE WROTE */
  71.